var casper = require('casper').create();

casper.start('https://www.baidu.com', function() {
    if (this.exists('div.s_form')) {
        this.echo('the heading exists');
    }
});

casper.run();